import { createRouter, createWebHashHistory } from 'vue-router'

const routes = [
  { path: '/login', component: () => import('../views/login.vue') },
  {
    path: '/backstage', component: () => import('../views/BackStage/index.vue'),
    children: [
      { path: '', component: () => import('../views/BackStage/BackStageVIew/ArticleView.vue') },
      { path: 'article', component: () => import('../views/BackStage/BackStageVIew/ArticleView.vue') },
      { path: 'category', component: () => import('../views/BackStage/BackStageVIew/CategoryView.vue') }
    ]
  },
  { path: '/', component: () => import('../views/HomePage/index.vue') },
  { path: '/detail', component: () => import('../views/HomePage/HomeContent/ArticleDetail.vue') }
]

const router = createRouter({
  history: createWebHashHistory(),
  routes
})
export default router